package com.cait.dutyfree.action.impl;

import java.util.ArrayList;
import java.util.List;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.SessionAware;
import org.apache.struts2.util.ServletContextAware;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.cait.dutyfree.dataaccess.ComplainServiceDao;
import com.cait.dutyfree.exception.DutyFreeException;
import com.cait.dutyfree.pojo.Complain;
import com.cait.dutyfree.pojo.LoginUser;
import com.opensymphony.xwork2.ActionSupport;

public class ComplainAction extends ActionSupport {
	private List complain;
	private ComplainServiceDao complainServiceDao;
	
	private List<Complain> complains = new ArrayList<Complain>();
	public String showcomplain()  {
		try{
			//setUsers(getUserServiceDAO().getUsers());
			setComplains(getComplainServiceDao().findcmplin());
			return SUCCESS;
		}catch (Exception e) {
			addFieldError("block", "No user list available");
			return NONE;
		}
		
	}
	public void setComplain(List complain) {
		this.complain = complain;
	}
	public List getComplain() {
		return complain;
	}
	public void setComplains(List<Complain> complains) {
		this.complains = complains;
	}
	public List<Complain> getComplains() {
		return complains;
	}
	public void setComplainServiceDao(ComplainServiceDao complainServiceDao) {
		this.complainServiceDao = complainServiceDao;
	}
	public ComplainServiceDao getComplainServiceDao() {
		return complainServiceDao;
	}
	
}
